//
//  WKExportKeystoreViewController.m
//  ourToken
//
//  Created by wakeup on 2018/6/4.
//  Copyright © 2018年 ourtoken. All rights reserved.
//

#import "WKExportKeystoreViewController.h"
#import "WKBaseHeader.h"

@interface WKExportKeystoreViewController ()

@property (weak, nonatomic) IBOutlet UIView *topView;//头部view
@property (weak, nonatomic) IBOutlet UIButton *fileBtn;//Keystore文件按钮
@property (weak, nonatomic) IBOutlet UIView *fileLineView;//Keystore文件按钮下划线
@property (weak, nonatomic) IBOutlet UIButton *codeBtn;//二维码按钮
@property (weak, nonatomic) IBOutlet UIView *codeLineView;//二维码按钮下划线

@end

@implementation WKExportKeystoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavigationView];
    [self layoutUI];
    self.view.backgroundColor = AppManager.tableBackColor;
}

- (void)setNavigationView {
    [super setNavigationView];
    self.navigationView.topTitleLabel.text = @"导出Keystore";
}

- (void)layoutUI {
    [self.fileBtn setTitleColor:AppManager.themeColor forState:UIControlStateNormal];
    self.fileLineView.backgroundColor = AppManager.themeColor;
    
    [self.codeBtn setTitleColor:AppManager.themeColor forState:UIControlStateNormal];
    self.codeLineView.backgroundColor = AppManager.themeColor;
    
    WKKeystoreFileView *keystoreFile = [[[NSBundle mainBundle]loadNibNamed:@"WKKeystoreFileView" owner:nil options:nil] lastObject];
    keystoreFile.frame = CGRectMake(0, CGRectGetMaxY(self.topView.frame)+10, AppManager.width, AppManager.height-CGRectGetMaxY(self.topView.frame)-10);
    [self.view addSubview:keystoreFile];
}

- (IBAction)clickKeystoreFileBtn:(id)sender {
    WKKeystoreFileView *keystoreFile = [[[NSBundle mainBundle]loadNibNamed:@"WKKeystoreFileView" owner:nil options:nil] lastObject];
    keystoreFile.frame = CGRectMake(0, CGRectGetMaxY(self.topView.frame)+10, AppManager.width, AppManager.height-CGRectGetMaxY(self.topView.frame)-10);
    [self.view addSubview:keystoreFile];
}

- (IBAction)clickCodeBtn:(id)sender {
    WKCodeView *code = [[[NSBundle mainBundle]loadNibNamed:@"WKCodeView" owner:nil options:nil] lastObject];
    code.frame = CGRectMake(0, CGRectGetMaxY(self.topView.frame)+10, AppManager.width, AppManager.height-CGRectGetMaxY(self.topView.frame)-10);
    [self.view addSubview:code];
}

@end
